package entity;

import java.security.Timestamp;
import java.sql.Date;
import java.text.SimpleDateFormat;

import org.springframework.format.annotation.DateTimeFormat;

public class register {
	private Integer id;
	private String name;//中文姓名
	private String email;//电子邮箱 
	private String tel;	//手机号码
	private String password;//密码
	private String work;//工作单位
	private String workwhere;//科室/部门
	private String gender;//性别
	private String idcard;//证件号码
	private String inc;//开票单位抬头
	private String incnum;//开票单位税号
	private String sleep;//是否需要住宿
	private String house;//房型选择（单/双）
	private String share;//是否合住 
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date in;	//入住日期 
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date out;	//退房时间
    private String intime;
    private String outtime;
    private SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd");
    public Date getOut() {
		return out;
	}
    public Date getIn() {
		return in;
	}
    public void setOut(Date out) {
        this.out = out;
        String time = sdf.format(out);
        setOuttime(time);
	} 
    public void setIn(Date in) {
        this.in = in;
        String time = sdf.format(in);
        setIntime(time);
	} 
	
    public String getIntime() {
		return intime;
	}
 
	public void setIntime(String intime) {
		this.intime = intime;
	}
 
	public String getOuttime() {
			return outtime;
		}
	 
	public void setOuttime(String outtime) {
			this.outtime = outtime;
		}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTel() {
		return tel;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getWork() {
		return work;
	}
	public void setWork(String work) {
		this.work = work;
	}
	public String getWorkwhere() {
		return workwhere;
	}
	public void setWorkwhere(String workwhere) {
		this.workwhere = workwhere;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	public String getInc() {
		return inc;
	}
	public void setInc(String inc) {
		this.inc = inc;
	}
	public String getIncnum() {
		return incnum;
	}
	public void setIncnum(String incnum) {
		this.incnum = incnum;
	}
	public String getSleep() {
		return sleep;
	}
	public void setSleep(String sleep) {
		this.sleep = sleep;
	}
	public String getHouse() {
		return house;
	}
	public void setHouse(String house) {
		this.house = house;
	}
	public String getShare() {
		return share;
	}
	public void setShare(String share) {
		this.share = share;
	}
	 

	
	
	@Override
	public String toString() {
		return "register [id=" + id + ", name=" + name + ", email=" + email
				+ ", tel=" + tel + ", password=" + password + ", work=" + work
				+ ", workwhere=" + workwhere + ", gender=" + gender
				+ ", idcard=" + idcard + ", inc=" + inc + ", incnum=" + incnum
				+ ", sleep=" + sleep + ", house=" + house + ", share=" + share
				+ ", in=" + in + ", out=" + out + ", intime=" + intime
				+ ", outtime=" + outtime + ", sdf=" + sdf + "]";
	}
	/**
	 * 传时间测试
	 */
	 
	 
}
